package yf.mall.mapper;

import java.math.BigDecimal;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import yf.mall.entity.KolOrderEntity;
import yf.mall.entity.KolOrderEntityExample;

@Mapper
@Repository
public interface KolOrderExtMapper {
    long countByExample(KolOrderEntityExample example);

    int deleteByExample(KolOrderEntityExample example);

    int deleteByPrimaryKey(Long id);

    int insert(KolOrderEntity record);

    int insertSelective(KolOrderEntity record);

    List<KolOrderEntity> selectByExample(KolOrderEntityExample example);

    KolOrderEntity selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") KolOrderEntity record, @Param("example") KolOrderEntityExample example);

    int updateByExample(@Param("record") KolOrderEntity record, @Param("example") KolOrderEntityExample example);

    int updateByPrimaryKeySelective(KolOrderEntity record);

    int updateByPrimaryKey(KolOrderEntity record);

    BigDecimal countOrderTotalPayAmount(@Param("openIds") List<String> openIds, @Param("productId") Long productId);
    BigDecimal countOrderEstimatedTotalCommission(@Param("openIds") List<String> openIds, @Param("productId") Long productId);

    Long countOrders(@Param("openIds") List<String> openIds, @Param("productId") Long productId);
}